package com.ruoyi.web.controller.mem;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.entity.SysDept;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.mem.service.MemInfoService;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/mem/info")
public class MemInfoController extends BaseController {

    @Resource
    private MemInfoService memInfoService;

    /**
     * 获取会员列表
     */
    //@PreAuthorize("@ss.hasPermi('mem:info:queryInfo')")
    @PostMapping("/queryList")
    public TableDataInfo queryList(HttpServletRequest request) {
        Map param = new HashMap();
        startPage();
        List<Map<String,String>>data = memInfoService.queryList(param);
        return getDataTable(data);
    }
}
